package cn.iocoder.yudao.module.trade.controller.app.giftcard.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import org.hibernate.validator.constraints.URL;

import java.util.List;
import java.util.Map;

@Schema(description = "用户 App - 创建订单与礼品卡 Request VO")
@Data
public class AppCreateGiftCardReqVO {

    @Schema(description = "礼品卡微信 id", requiredMode = Schema.RequiredMode.REQUIRED, example = "")
    @NotNull(message = "礼品卡微信 id不能为空")
    private String wxCardId;

    @Schema(description = "选择的祝福语", requiredMode = Schema.RequiredMode.REQUIRED, example = "")
    @NotNull(message = "选择的祝福语 不能为空")
    private String blessings;

    @Schema(description = "创建人openId", requiredMode = Schema.RequiredMode.REQUIRED, example = "")
    @NotNull(message = "创建人openId 不能为空")
    private String createOpenId;

//    用户自己选
//    @Schema(description = "礼品卡选择的商品", requiredMode = Schema.RequiredMode.REQUIRED, example = "")
//    @NotNull(message = "礼品卡选择的商品 不能为空")
//    private List<AppGiftCardSpuReqVO> giftCardSpuReqVO;

    /**
     * 后管配置
     */
    @Schema(description = "礼品卡商品组合id", requiredMode = Schema.RequiredMode.REQUIRED, example = "")
    @NotNull(message = "礼品卡商品组合id 不能为空")
    private List<AppGiftCardGroupReqVO> giftCardGroupReqVOS;

    @Schema(description = "备注", requiredMode = Schema.RequiredMode.NOT_REQUIRED, example = "")
    private String remark;


    //创建订单后 支付相关
    @Schema(description = "支付渠道", requiredMode = Schema.RequiredMode.REQUIRED, example = "wx_pub")
    @NotEmpty(message = "支付渠道不能为空")
    private String channelCode;

    @Schema(description = "支付渠道的额外参数，例如说，微信公众号需要传递 openid 参数")
    private Map<String, String> channelExtras;

    @Schema(description = "展示模式", example = "url") // 参见 {@link PayDisplayModeEnum} 枚举。如果不传递，则每个支付渠道使用默认的方式
    private String displayMode;

    @Schema(description = "回跳地址")
    @URL(message = "回跳地址的格式必须是 URL")
    private String returnUrl;

    @Schema(description = "groupType 1:储值卡 0:商品组合", requiredMode = Schema.RequiredMode.NOT_REQUIRED, example = "1")
    private Integer groupType;

}
